package com.gjun.struts.bean;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.gjun.struts.bean.ext.Order;

public class OrderJsonBean {

	private int id;
	private int userId;
	private int status;
	private long orderTime;
	private String orderTime_str;
	
	private String orderDesc;
	private double totalPrice;
	private String receiveName;
	private String fullAddress;
	private String postalCode;
	private String mobile;
	private String phone;
	private String isSend;
	private String isReceive;
	
	
	
	/**
	 * @return the isSend
	 */
	public String getIsSend() {
		return isSend;
	}
	/**
	 * @param isSend the isSend to set
	 */
	public void setIsSend(String isSend) {
		this.isSend = isSend;
	}
	/**
	 * @return the isReceive
	 */
	public String getIsReceive() {
		return isReceive;
	}
	/**
	 * @param isReceive the isReceive to set
	 */
	public void setIsReceive(String isReceive) {
		this.isReceive = isReceive;
	}
	/**
	 * @return the orderTime_str
	 */
	public String getOrderTime_str() {
		return orderTime_str;
	}
	/**
	 * @param orderTimeStr the orderTime_str to set
	 */
	public void setOrderTime_str(String orderTimeStr) {
		orderTime_str = orderTimeStr;
	}
	
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * @return the userId
	 */
	public int getUserId() {
		return userId;
	}
	/**
	 * @param userId the userId to set
	 */
	public void setUserId(int userId) {
		this.userId = userId;
	}
	/**
	 * @return the status
	 */
	public int getStatus() {
		return status;
	}
	/**
	 * @param status the status to set
	 */
	public void setStatus(int status) {
		this.status = status;
	}
	/**
	 * @return the orderTime
	 */
	public long getOrderTime() {
		return orderTime;
	}
	/**
	 * @param orderTime the orderTime to set
	 */
	public void setOrderTime(long orderTime) {
		this.orderTime = orderTime;
	}
	/**
	 * @return the orderDesc
	 */
	public String getOrderDesc() {
		return orderDesc;
	}
	/**
	 * @param orderDesc the orderDesc to set
	 */
	public void setOrderDesc(String orderDesc) {
		this.orderDesc = orderDesc;
	}
	/**
	 * @return the totalPrice
	 */
	public double getTotalPrice() {
		return totalPrice;
	}
	/**
	 * @param totalPrice the totalPrice to set
	 */
	public void setTotalPrice(double totalPrice) {
		this.totalPrice = totalPrice;
	}
	/**
	 * @return the receiveName
	 */
	public String getReceiveName() {
		return receiveName;
	}
	/**
	 * @param receiveName the receiveName to set
	 */
	public void setReceiveName(String receiveName) {
		this.receiveName = receiveName;
	}
	/**
	 * @return the fullAddress
	 */
	public String getFullAddress() {
		return fullAddress;
	}
	/**
	 * @param fullAddress the fullAddress to set
	 */
	public void setFullAddress(String fullAddress) {
		this.fullAddress = fullAddress;
	}
	/**
	 * @return the postalCode
	 */
	public String getPostalCode() {
		return postalCode;
	}
	/**
	 * @param postalCode the postalCode to set
	 */
	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}
	/**
	 * @return the mobile
	 */
	public String getMobile() {
		return mobile;
	}
	/**
	 * @param mobile the mobile to set
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	/**
	 * @return the phone
	 */
	public String getPhone() {
		return phone;
	}
	/**
	 * @param phone the phone to set
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public OrderJsonBean(Order order) {
		super();
		this.id = order.getId();
		this.userId = order.getUserId();
		this.status = order.getStatus();
		this.orderTime = order.getOrderTime();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-DD");
		this.orderTime_str = sdf.format(new Date(orderTime)); 
		this.orderDesc = order.getOrderDesc();
		this.totalPrice = order.getTotalPrice();
		
		this.receiveName = order.getReceiveName();
		this.fullAddress = order.getFullAddress();
		this.postalCode = order.getPostalCode();
		this.mobile = order.getMobile();
		this.phone = order.getPhone();
		this.isSend = order.getIsSend();
		this.isReceive = order.getIsReceive();
		
	}
	
	
	
	
	
}
